package org.pupil.socket.codec;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 请求消息
 * @Author: pupil
 * @Date: 2024/07/09 下午 3:43
 */
public class RpcRequest implements Serializable {

    private String serviceVersion; // 服务版本
    private String className; // 类名
    private String methodName; // 方法名
    private Integer methodCode; // 方法的hashCode
    private Object[] parameter; // 方法参数
    private Class<?>[] parameterTypes; // 方法参数类型

    private Map<String, Object> serviceAttachments = new HashMap<>(); // 服务提供方附件
    private Map<String, Object> clientAttachments = new HashMap<>(); // 服务发送方附件

    public RpcRequest() {
    }

    public Map<String, Object> getServiceAttachments() {
        return serviceAttachments;
    }

    public void setServiceAttachments(Map<String, Object> serviceAttachments) {
        this.serviceAttachments = serviceAttachments;
    }

    public Map<String, Object> getClientAttachments() {
        return clientAttachments;
    }

    public void setClientAttachments(Map<String, Object> clientAttachments) {
        this.clientAttachments = clientAttachments;
    }

    public String getServiceVersion() {
        return serviceVersion;
    }

    public void setServiceVersion(String serviceVersion) {
        this.serviceVersion = serviceVersion;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Integer getMethodCode() {
        return methodCode;
    }

    public void setMethodCode(Integer methodCode) {
        this.methodCode = methodCode;
    }

    public Object[] getParameter() {
        return parameter;
    }

    public void setParameter(Object[] parameter) {
        this.parameter = parameter;
    }

    public Class<?>[] getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(Class<?>[] parameterTypes) {
        this.parameterTypes = parameterTypes;
    }
}
